.class Lcom/netease/newsreader/view/ImageViewTouch$2;
.super Ljava/lang/Object;
.source "ImageViewTouch.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/netease/newsreader/view/ImageViewTouch;->center(ZZF)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/netease/newsreader/view/ImageViewTouch;

.field private final synthetic val$durationMs:F

.field private final synthetic val$incrementXPerMs:F

.field private final synthetic val$incrementYPerMs:F

.field private final synthetic val$old:Landroid/graphics/PointF;

.field private final synthetic val$orig:Landroid/graphics/PointF;

.field private final synthetic val$startTime:J


# direct methods
.method constructor <init>(Lcom/netease/newsreader/view/ImageViewTouch;FJLandroid/graphics/PointF;FLandroid/graphics/PointF;F)V
    .locals 0
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->this$0:Lcom/netease/newsreader/view/ImageViewTouch;

    iput p2, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$durationMs:F

    iput-wide p3, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$startTime:J

    iput-object p5, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$orig:Landroid/graphics/PointF;

    iput p6, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$incrementXPerMs:F

    iput-object p7, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$old:Landroid/graphics/PointF;

    iput p8, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$incrementYPerMs:F

    .line 328
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 8

    .prologue
    .line 330
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v1

    .line 331
    .local v1, now:J
    iget v5, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$durationMs:F

    iget-wide v6, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$startTime:J

    sub-long v6, v1, v6

    long-to-float v6, v6

    invoke-static {v5, v6}, Ljava/lang/Math;->min(FF)F

    move-result v0

    .line 332
    .local v0, currentMs:F
    iget-object v5, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$orig:Landroid/graphics/PointF;

    iget v5, v5, Landroid/graphics/PointF;->x:F

    iget v6, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$incrementXPerMs:F

    mul-float/2addr v6, v0

    add-float/2addr v5, v6

    iget-object v6, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$old:Landroid/graphics/PointF;

    iget v6, v6, Landroid/graphics/PointF;->x:F

    sub-float v3, v5, v6

    .line 333
    .local v3, targetX:F
    iget-object v5, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$orig:Landroid/graphics/PointF;

    iget v5, v5, Landroid/graphics/PointF;->y:F

    iget v6, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$incrementYPerMs:F

    mul-float/2addr v6, v0

    add-float/2addr v5, v6

    iget-object v6, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$old:Landroid/graphics/PointF;

    iget v6, v6, Landroid/graphics/PointF;->y:F

    sub-float v4, v5, v6

    .line 334
    .local v4, targetY:F
    iget-object v5, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->this$0:Lcom/netease/newsreader/view/ImageViewTouch;

    invoke-virtual {v5, v3, v4}, Lcom/netease/newsreader/view/ImageViewTouch;->postTranslate(FF)V

    .line 335
    iget-object v5, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->this$0:Lcom/netease/newsreader/view/ImageViewTouch;

    iget-object v6, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->this$0:Lcom/netease/newsreader/view/ImageViewTouch;

    invoke-virtual {v6}, Lcom/netease/newsreader/view/ImageViewTouch;->getImageViewMatrix()Landroid/graphics/Matrix;

    move-result-object v6

    invoke-virtual {v5, v6}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageMatrix(Landroid/graphics/Matrix;)V

    .line 338
    iget-object v5, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$old:Landroid/graphics/PointF;

    iget v6, v5, Landroid/graphics/PointF;->x:F

    add-float/2addr v6, v3

    iput v6, v5, Landroid/graphics/PointF;->x:F

    .line 339
    iget-object v5, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$old:Landroid/graphics/PointF;

    iget v6, v5, Landroid/graphics/PointF;->y:F

    add-float/2addr v6, v4

    iput v6, v5, Landroid/graphics/PointF;->y:F

    .line 341
    iget v5, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->val$durationMs:F

    cmpg-float v5, v0, v5

    if-gez v5, :cond_0

    .line 342
    iget-object v5, p0, Lcom/netease/newsreader/view/ImageViewTouch$2;->this$0:Lcom/netease/newsreader/view/ImageViewTouch;

    invoke-virtual {v5, p0}, Lcom/netease/newsreader/view/ImageViewTouch;->post(Ljava/lang/Runnable;)Z

    .line 344
    :cond_0
    return-void
.end method
